package behavior.TemplateMethod;

import java.util.function.Consumer;

/**
 * Created by LYJ on 2016/10/20.
 */
public class Bank2 {
    //使用lambda表达式 引入Consumer<T>参数
    public void processUser(int id, Consumer<User> makeUserHappy){
        User user=Dao.getById(id);
        makeUserHappy.accept(user);

    }
}
